package com.game.backend.controller.user.account;

import com.game.backend.service.user.account.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/user/account")
public class RegisterController {
    @Autowired
    private RegisterService registerService;

    @RequestMapping("/register")
    public Map<String,String> register(String username,String password,String confirmedPassword){
        return registerService.register(username,password,confirmedPassword);
    }

    @RequestMapping("/check_username")
    public Map<String,String> checkUsername(String username){
        return registerService.checkUsername(username);
    }
}
